﻿Public Class F11_M_anverso_

    Private Sub btnguardar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnguardar.Click
        If (Len(txtnumform.Text) = 0) Then
            MsgBox("EL Número de formulario es un campo obligatorio", MsgBoxStyle.Exclamation)
            txtnumform.Focus()
            Exit Sub
        End If
        Dim oF11Negocios As New Negocios.NF11_V
        Dim oF11 As New Entidades.EF11Vehiculos
        oF11.numformu = UCase(txtnumform.Text)
        oF11.domini = UCase(txtdominio.Text)
        oF11.indicaa = UCase(txtindica.Text)
        oF11.nomapevendd = UCase(txtnomapevend.Text)
        oF11.solteroo = UCase(txtsoltero.Text)
        oF11.casadoo = UCase(txtcasado.Text)
        oF11.viudoo = UCase(txtviudo.Text)
        oF11.divv = UCase(txtdiv.Text)
        oF11.numnupciaa = UCase(txtnumnupcia.Text)
        oF11.nomapeapodd = UCase(txtnomapeapod.Text)
        oF11.dnii = UCase(txtdni.Text)
        oF11.lee = UCase(txtle.Text)
        oF11.lcc = UCase(txtlc.Text)
        oF11.cii = UCase(txtci.Text)
        oF11.pasapp = UCase(txtpasap.Text)
        oF11.numm = UCase(txtnum.Text)
        oF11.autoridadd = UCase(txtautoridad.Text)
        oF11.apenomconyvendd = UCase(txtapenomconyvend.Text)
        oF11.apenomconyapodd = UCase(txtapenomconyapod.Text)
        oF11.dniaa = UCase(txtdnia.Text)
        oF11.leaa = UCase(txtlea.Text)
        oF11.lcaa = UCase(txtlca.Text)
        oF11.ciaa = UCase(txtcia.Text)
        oF11.pasapaa = UCase(txtpasapa.Text)
        oF11.numaa = UCase(txtnuma.Text)
        oF11.autoridadaa = UCase(txtautoridada.Text)
        oF11.posesionn = UCase(txtposesion.Text)
        oF11.tenenciaa = UCase(txttenencia.Text)
        oF11.lugarr = UCase(txtlugar.Text)
        oF11.diaa = UCase(txtdia.Text)
        oF11.mess = UCase(txtmes.Text)
        oF11.añoo = UCase(txtaño.Text)

        Try
            If oF11Negocios.guardarF11(oF11) Then
                MsgBox("La carga ha sido exitosa", MsgBoxStyle.MsgBoxSetForeground, "Información")
            End If
        Catch ex As Exception
            MsgBox("Carga fallida. " + ex.Message, MsgBoxStyle.MsgBoxSetForeground, "Información")
        End Try
    End Sub

    Private Sub btnEditarAnverso_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEditarAnverso.Click

        If (Len(txtnumform.Text) = 0) Then
            MsgBox("EL Número de formulario es un campo obligatorio", MsgBoxStyle.Exclamation)
            txtnumform.Focus()
            Exit Sub
        End If
        Dim oF11Negocios As New Negocios.NF11_V
        Dim oF11 As New Entidades.EF11Vehiculos
        oF11.numformu = UCase(txtnumform.Text)
        oF11.domini = UCase(txtdominio.Text)
        oF11.indicaa = UCase(txtindica.Text)
        oF11.nomapevendd = UCase(txtnomapevend.Text)
        oF11.solteroo = UCase(txtsoltero.Text)
        oF11.casadoo = UCase(txtcasado.Text)
        oF11.viudoo = UCase(txtviudo.Text)
        oF11.divv = UCase(txtdiv.Text)
        oF11.numnupciaa = UCase(txtnumnupcia.Text)
        oF11.nomapeapodd = UCase(txtnomapeapod.Text)
        oF11.dnii = UCase(txtdni.Text)
        oF11.lee = UCase(txtle.Text)
        oF11.lcc = UCase(txtlc.Text)
        oF11.cii = UCase(txtci.Text)
        oF11.pasapp = UCase(txtpasap.Text)
        oF11.numm = UCase(txtnum.Text)
        oF11.autoridadd = UCase(txtautoridad.Text)
        oF11.apenomconyvendd = UCase(txtapenomconyvend.Text)
        oF11.apenomconyapodd = UCase(txtapenomconyapod.Text)
        oF11.dniaa = UCase(txtdnia.Text)
        oF11.leaa = UCase(txtlea.Text)
        oF11.lcaa = UCase(txtlca.Text)
        oF11.ciaa = UCase(txtcia.Text)
        oF11.pasapaa = UCase(txtpasapa.Text)
        oF11.numaa = UCase(txtnuma.Text)
        oF11.autoridadaa = UCase(txtautoridada.Text)
        oF11.posesionn = UCase(txtposesion.Text)
        oF11.tenenciaa = UCase(txttenencia.Text)
        oF11.lugarr = UCase(txtlugar.Text)
        oF11.diaa = UCase(txtdia.Text)
        oF11.mess = UCase(txtmes.Text)
        oF11.añoo = UCase(txtaño.Text)

        Try
            If oF11Negocios.editarF11(oF11) Then
                MsgBox("La Edición ha sido exitosa", MsgBoxStyle.MsgBoxSetForeground, "Información")
            End If
        Catch ex As Exception
            MsgBox("Edición fallida. " + ex.Message, MsgBoxStyle.MsgBoxSetForeground, "Información")
        End Try
    End Sub

    Private Sub btnsalir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsalir.Click
        Me.Close()
    End Sub

    Private Sub btnNuevo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNuevo.Click
        txtnumform.Text = ""
        txtdominio.Text = ""
        txtindica.Text = ""
        txtnomapevend.Text = ""
        txtsoltero.Text = ""
        txtcasado.Text = ""
        txtviudo.Text = ""
        txtdiv.Text = ""
        txtnumnupcia.Text = ""
        txtnomapeapod.Text = ""
        txtdni.Text = ""
        txtle.Text = ""
        txtlc.Text = ""
        txtci.Text = ""
        txtpasap.Text = ""
        txtnum.Text = ""
        txtautoridad.Text = ""
        txtapenomconyvend.Text = ""
        txtapenomconyapod.Text = ""
        txtdnia.Text = ""
        txtlea.Text = ""
        txtlca.Text = ""
        txtcia.Text = ""
        txtpasapa.Text = ""
        txtnuma.Text = ""
        txtautoridada.Text = ""
        txtposesion.Text = ""
        txttenencia.Text = ""
        txtlugar.Text = ""
        txtdia.Text = ""
        txtmes.Text = ""
        txtaño.Text = ""



    End Sub
    Private Sub btnF01V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01V.Click
        F01_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF01M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01M.Click
        F01_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF01I_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01I.Click
        F01_VImp_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF02V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF02V.Click
        F02_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF02M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF02M.Click
        F02_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF04V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF04V.Click
        F04_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click
        F04_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF08V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF08V.Click
        F08_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF08M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF08M.Click
        F08_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF11V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF11V.Click
        F11_V_anverso_.Show()
        Me.Close()

    End Sub


    Private Sub btnF12V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF12V.Click
        F12_V.Show()
        Me.Close()
    End Sub

    Private Sub btnF12M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF12M.Click
        F12_M.Show()
        Me.Close()
    End Sub

    Private Sub btnF99_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF99.Click
        F99.Show()
        Me.Close()
    End Sub

    Private Sub btnF59M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF59M.Click
        F59_M.Show()
        Me.Close()
    End Sub

    Private Sub btnFR00_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFR00.Click
        F_R00.Show()
        Me.Close()
    End Sub
   
    Private Sub btnReverso_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReverso.Click
        MsgBox("El presente formulario no posee lado Reverso", MsgBoxStyle.DefaultButton1, Title:="INFORMACIÓN")
    End Sub
End Class
